package com.lp.chapter001.controller;

import com.lp.chapter001.dto.StudentDTO;
import com.lp.chapter001.service.StudentService;
import com.lp.chapter001.util.ResultData;
import com.lp.chapter001.vo.PageVO;
import com.lp.chapter001.vo.StudentVO;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Student控制器
 * @author LP to 2024/03/03
 */
@RestController
@RequestMapping("/student")
@AllArgsConstructor
public class StudentController {

    private final StudentService studentService;

    /**
     * 学生列表
     * @author LP to 2024/3/3
     */
    @RequestMapping("/pageList")
    public ResultData<PageVO<StudentVO>> studentPageList(@RequestBody StudentDTO dto) {
        return studentService.studentPageList(dto);
    }

}
